{extend name='common/dialog'}
{block name='content'}
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <form class="form-horizontal" data-toggle="validator" method="POST" role="form" data-loading="3">
                    <div class="form-group">
                        <label for="column_id" class="control-label">栏目</label>
                        <div class="form-item">
                            <select name="row[column_id]" class="form-control" data-rule="required" id="column_id">
                                <option value="">请选择</option>
                                {foreach $column_list as $k=>$v}
                                <option value="{$k}">{$v}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="title" class="control-label">标题</label>
                        <div class="form-item">
                            <input type="text" class="form-control" data-rule="required" name="row[title]" id="title"
                                   placeholder="请输入标题" value=""/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="content" class="control-label">文章内容</label>
                        <div class="form-item">

                            <textarea class="form-control editor" id="content" name="row[content]" rows="5"
                                      placeholder="文章内容"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="content" class="control-label">文章标签</label>
                        <div class="input-group">
                            <input type="text" name="row[tag]" id="c-tag" value="" class="form-control">
                            <div class="input-group-btn">
                                <button class="btn btn-default btn-tag" type="button">获取标签</button>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="c-seo_keywords" class="control-label">SEO关键词</label>
                        <div class="form-item">
                            <input type="text" name="row[seo_keywords]" class="form-control" id="c-seo_keywords"
                                   value="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-seo_description" class="control-label">SEO描述</label>
                        <div class="form-item">
                            <textarea class="form-control" id="c-seo_description" name="row[seo_description]" rows="5"
                                      placeholder="SEO描述"></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="add-cover" class="control-label">封面</label>
                        <div class="form-item">
                            <button type="button" class="btn btn-sm btn-danger webupload" id="add-cover"
                                    data-input-id="c-cover"
                                    data-preview-id="cover-image" data-multiple="true" >封面上传
                            </button>
                            <button type="button" class="btn btn-sm btn-info btn-getimg" >从文章中提取
                            </button>

                            <input type="hidden" name="row[cover]" id="c-cover" value="">
                            <ul class="list-inline clearfix lyear-uploads-pic" id="cover-image">
                            </ul>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-like" class="control-label">喜欢数量</label>
                        <div class="form-item">
                            <input type="number" name="row[like]" class="form-control" id="c-like" value="5">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-dislike" class="control-label">不喜欢数量</label>
                        <div class="form-item">
                            <input type="number" name="row[dislike]" class="form-control" id="c-dislike" value="0">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-reading_count" class="control-label">阅读数量</label>
                        <div class="form-item">
                            <input type="number" name="row[reading_count]" class="form-control" id="c-reading_count"
                                   value="10">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-share_count" class="control-label">分享数量</label>
                        <div class="form-item">
                            <input type="number" name="row[share_count]" class="form-control" id="c-share_count"
                                   value="2">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="c-publish_time" class="control-label">发布时间</label>
                        <div class="form-item">
                            <input type="text" name="row[publish_time]" class="form-control datetimepicker" id="c-publish_time"
                                   value="">
                        </div>
                    </div>
                    <div class="form-group hidden layer-footer">
                        <label class="control-label col-xs-12 col-sm-2"></label>
                        <div class="col-xs-12 col-sm-8">
                            <button type="submit" class="btn btn-success btn-embossed disabled">提交</button>
                            <button type="reset" class="btn btn-default btn-embossed">重置</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>
{include file='/content/article/template'/}
{/block}
{include file='template'/}
